import { ROUTER_PATHS_PUBLIC } from '@/constants/global'
import useUserInfo from '@/zustand/useUserInfo'
import { useEffect } from 'react'
import { useNavigate } from 'react-router-dom'

export default function Register() {
  const navigate = useNavigate()

  const token = useUserInfo((s) => s.token)

  useEffect(() => {
    if (token) navigate(ROUTER_PATHS_PUBLIC.SLASH, { replace: true })
  }, [navigate, token])

  return token ? null : <div>Register</div>
}
